package com.k2data.k2app.domain.po;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.k2data.k2app.mybatis.handler.JsonTypeHandler;
import lombok.Data;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Map;

/**
 * @author lidong9144@163.com 17-3-20.
 */
@Data
@Table(name = "dict")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DictPO implements Serializable {

    @Transient
    private static final long serialVersionUID = -3798159993729857265L;

    @JsonIgnore
    @Id
    @GeneratedValue(generator = "JDBC")
    private Long id;
    private String label;
    private String value;
    @ColumnType(typeHandler = JsonTypeHandler.class)
    private Map<String, String> ext;
    private String type;
    @JsonIgnore
    private ZonedDateTime createTime;
    @JsonIgnore
    private ZonedDateTime updateTime;

}
